import sys
from PyQt5.QtGui import*
from PyQt5.QtCore import*
from PyQt5.QtWidgets import*
# sys.path.append("../")
from ui.Ui_mainwindow import Ui_MainWindow
from views.widget_upper_car import UpperCarWidget

class MainWindow(QMainWindow):

    def __init__(self,parent=None):
        super().__init__(parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.init_ui()

    def init_ui(self):
        self.ui.tabWidget.addTab(QWidget(self),"网络助手")
        self.ui.tabWidget.addTab(UpperCarWidget(self), "串口助手")
        self.ui.tabWidget.addTab(QWidget(self),"小车上位机")
        self.ui.tabWidget.setCurrentIndex(self.ui.tabWidget.count()-2)
if __name__=="__main__":
    app = QApplication(sys.argv)
    
    window = MainWindow()
    
    window.show()
    
    sys.exit(app.exec_())
